Nowadays, one method for obtaining a high dynamic range (HDR) image in an image sensor having a pixel array including a plurality of pixels arranged in columns and rows comprises the steps of: exposing all rows of the pixel array for a long time to obtain long exposing information of an image; exposing all rows of the pixel array for a short time to obtain short exposing information of an image; and combining the long exposing information and the short exposing information.
For an image sensor, the exposure procedure is achieved through the following steps: resetting the pixel array row by row from an initial row of the pixel array that will process an integration treatment; and reading out the image data of the pixel array row by row from the initial row of the pixel array after a time cycle. It takes two time cycles to finish reading out the whole image data of a frame of the image.
To reduce the time for reading out the image data, a method for outputting a HDR image is provided in the prior art. FIG. 1 shows a sequence diagram of outputting a HDR image in the prior art. The first integration time of the first image is 10 time units, and according to the first integration time the method resets the pixel array row by row from the initial row of the pixel array to process a first integration treatment when the row counting signal reaches Line_counter 10 in a time cycle. The first integration time of the first image is then compared with a first integration time of the second image (100 time units). To avoid two rows being reset to process a first integration treatment at the same time, the frame length is adjusted to 1110 from 1020. As a result, the pixel array won't be reset to process a first integration treatment for the second image until all the valid rows of the pixel array have been reset to process a first integration treatment and a second integration treatment for the first image.
In the prior art, a first integration time of the first image is T1; a second integration time of the first image is T2; a maximum second integration time is M and a first integration time of the second image is T3. In the specific frames, T1 is 10 time units, T2 is 2 time units, M is 5 time units and T3 is 100 time units.
The method resets the pixel array row by row from the initial row of the pixel array to process a first integration treatment for the first image when the row counting signal reaches 10 in a first time cycle. When the row counting signal Line_counter reaches 1110 in a second time cycle, the second integration image data is read out row by row from an initial row of the pixel array. Because the maximum second integration time M is 5, and the second integration time of the first image T2 is 2, the pixel array is reset row by row from an initial row of the pixel array to process a second integration treatment when the row counting signal Line_counter reaches 1107 and the first integration image data is read out row by row from an initial row of the pixel array when the row counting signal Line_counter reaches 1105. The first integration image data or the integration image data in a row is read out in a time unit. When the row counting signal Line_counter reaches an even number, a row in the pixel array is reset to process a first integration treatment and the first integration image data in another row is read out. When the row counting signal Line_counter reaches an odd number, a row in the pixel array is reset to process a second integration treatment and the second integration image data in another row is read out. Finally the pixel array is reset row by row from the initial row of the pixel array to process a first integration treatment for the second image when the row counting signal reaches 100 in the second time cycle.
When the row counting signal Line_counter reaches 1106 in the second time cycle, the first integration image data in row 2 is read out and the row 7 in the pixel array is reset to process a first integration treatment. When the row counting signal Line_counter reaches 1105 in the second time cycle, the second integration image data in row 0 is read out and the row 1 in the pixel array is reset to process a second integration treatment. The pixel array won't be reset to process a first integration treatment for the second image until all the valid rows of the pixel array have been reset to process a first integration treatment and a second integration treatment for the first image. In the reset and read out procedure, the address of the row for reading out the second integration image data of the first image is less than the address of the row being reset to process a second integration treatment; the row being reset to process a second integration treatment is less than the address of the row for reading out the first integration image data of the first image; and the address of the row for reading out the first integration image data of the first image is than the row being reset to process a first integration treatment.
In the prior art, the frame length is adjusted from 1020 to 1110, that is, the frame rate is decreased, which can't satisfy the requirement made by the national television standards committee (NTSC) or the phase alternating line (PAL) that when the image is output the frame rate should be a content. Furthermore, if a high dynamic image needs to be output, the image data, equal to two frame image data in a general mode, should be output in a frame time. The image data of one frame is a first integration image data and the image data of another frame is a second integration image data. To obtain the high dynamic image data by reading out the first integration image data and the second integration image data in turn, all the times for processing the first integration treatment should be with the same parity and all the times for processing the second integration treatment should be with the same parity. So the object to output the high dynamic image data with random first integration time and second integration time can't be achieved in the prior art.